/**
 * @file rank/elementary/luogu1897/main.cpp
 * @brief
 * @see
 * @author Ruiming Guo (guoruiming@stu.scu.edu.cn)
 * @copyright 2022
 * @date 2022/7/7 15:11:22
 **/

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
map<int, int> mp;
int main() {
  // High rating and good luck!
  int n;
  cin >> n;
  while (n--) {
    int a;
    cin >> a;
    mp[a]++;
  }
  int mx = mp.rbegin()->first;
  ll ans = 1LL * (6 + 4) * mx;
  for (auto [a, c] : mp) {
    ans += 1LL * (5 + c);
  }
  cout << ans << endl;
  return 0;
}
